﻿<%@ Page Language="C#" MasterPageFile="~/default-interno.master" AutoEventWireup="true"
    CodeBehind="regiao.aspx.cs" Inherits="CeA.Reports.Atendimento.Web.admin.regiao"
    Title="Busca de Regi&otilde;es" %>

<%@ Register Assembly="CeA.Reports.Atendimento.Web" Namespace="CeA.Reports.Atendimento.Web.ServerControls"
    TagPrefix="cc1" %>
<%@ Register Src="../inc/WebControls/MenuInterno.ascx" TagName="menuInterno" TagPrefix="uc1" %>
<%@ Register Src="../inc/WebControls/PesquisaRfs.ascx" TagName="PesquisaRfs" TagPrefix="uc2" %>
<%@ Register Src="../inc/WebControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc3" %>
<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" href="/css/popup.css" type="text/css" />
</asp:Content>
<asp:Content ID="filter" ContentPlaceHolderID="FilterContentPlaceholder" runat="server">
    <h2>
        Dados da Regi&atilde;o</h2>
    <table cellpadding="1" cellspacing="1">
        <tr>
            <td style="width: 80px;">
                <label for="txtRfs">
                    RFS</label>
            </td>
            <td>
                <asp:TextBox ID="txtRfs" runat="server" CssClass="text-field" Width="200px" MaxLength="128"
                    ReadOnly="true" />
                <asp:Button ID="cmdPesquisarRfs" runat="server" CssClass="search-buttom" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="txtSigla">
                    Sigla</label>
            </td>
            <td>
                <asp:TextBox ID="txtSigla" runat="server" CssClass="text-field" Width="225px" MaxLength="40" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="txtNome">
                    Nome</label>
            </td>
            <td>
                <asp:TextBox ID="txtNome" runat="server" CssClass="text-field" Width="550px" MaxLength="100" />
            </td>
        </tr>
    </table>
    <span class="break">
        <asp:Button ID="cmdPesquisar" runat="server" CssClass="form-buttom" Text="Pesquisar" />
    </span>
    
        <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:DataList ID="dtlRfs" runat="server" Width="100%" CellSpacing="1" 
        CellPadding="0" onitemcommand="dtlRfs_ItemCommand">
        <ItemStyle CssClass="cor-1" />
        <AlternatingItemStyle CssClass="cor-2" />
        <HeaderTemplate>
            <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
                <tr>
                    <td colspan="3">
                        <h2>
                            Lista das Regi&otilde;es</h2>
                    </td>
                </tr>
                <tr class="th">
                    <td style="width: 21px">
                        &nbsp;
                    </td>
                    <td style="width: 90px">
                        RFS
                    </td>
                    <td style="width: 150px">
                        Sigla
                    </td>
                    <td style="width: auto">
                        Nome
                    </td>
                    <td style="width: 50px" colspan="2">
                        Ordem
                    </td>
                </tr>
            </table>
        </HeaderTemplate>
        <ItemTemplate>
            <table cellpadding="0" cellspacing="0" style="width: 100%">
                <tr class="list-row">
                    <td style="width: 21px">
                        <cc1:GroupRadioButton ID="rbtItem" runat="server" GroupName="rfsid" Text='<%#DataBinder.Eval(Container.DataItem, "Id")%>' />
                    </td>
                    <td style="width: 90px">
                        <%#DataBinder.Eval(Container.DataItem, "Rfs.Nome")%>
                    </td>
                    <td style="width: 150px">
                        <%#DataBinder.Eval(Container.DataItem, "Sigla")%>
                    </td>
                    <td style="width: auto">
                        <%#DataBinder.Eval(Container.DataItem, "Nome")%>
                    </td>
                    <td style="width: 20px; text-align: left;">
                        <asp:ImageButton ImageUrl="~/img/seta-vermelha-cima.gif" ID="lnkSobe" runat="server" CommandName="sobe" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Id")%>'></asp:ImageButton>
                    </td>
                    <td style="width: 25px; text-align: left;">
                        <asp:ImageButton ImageUrl="~/img/seta-vermelha-baixo.gif" ID="lnkDesce" runat="server" CommandName="desce" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Id")%>'></asp:ImageButton>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <FooterTemplate>
            <span class="break">
                <asp:Button ID="cmdEditar" runat="server" CssClass="form-buttom" Text="Editar" OnClick="cmdEditar_Click" />
                <asp:Button ID="cmdExcluir" runat="server" CssClass="form-buttom" Text="Excluir"
                    OnClick="cmdExcluir_Click" />
            </span>
        </FooterTemplate>
    </asp:DataList>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="updProgress1" runat="server">
        <ProgressTemplate>
        <p>Loading...</p>
        </ProgressTemplate>
    </asp:UpdateProgress>
    
    
    <asp:HiddenField ID="hdnRfsId" runat="server" Value="" />
    <uc2:PesquisaRfs ID="PesquisaRfs" runat="server" />
    <uc3:MessageBox ID="MessageBox" runat="server" />

</asp:Content>
<asp:Content ID="menu" ContentPlaceHolderID="MenuInternoPlaceholder" runat="server">
    <uc1:menuInterno ID="menuInterno" runat="server" Titulo="Aç&otilde;es" />
</asp:Content>
